package com.fulu.game.bi.service.impl.dispatch;

import com.fulu.game.bi.entity.enums.StrategyTypeEnum;
import com.fulu.game.bi.entity.vo.common.IdNameVO;
import com.fulu.game.bi.hbase.HBaseRoomExposureStatDAO;
import com.fulu.game.bi.mysql.playadmin.BuffConfigDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class ExposureConditionServiceImpl {

    @Autowired
    private BuffConfigDao buffConfigDao;
    @Autowired
    private HBaseRoomExposureStatDAO hBaseRoomExposureStatDAO;

    public List<IdNameVO> manualStrategy() {
        return buffConfigDao.findByStrategyType(StrategyTypeEnum.MANUAL.getType());
    }

    public List<IdNameVO> roomScene() {
        List<IdNameVO> idNameVOS = hBaseRoomExposureStatDAO.roomScene();
        idNameVOS.removeIf(map -> map == null);
        return idNameVOS;
    }
}
